package io.renren.param;

import io.renren.entity.RoomEntity;
import io.renren.group.UpdateGroup;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class RoomSaveParam {
    @NotNull(groups = UpdateGroup.class, message = "会议室id不能为空")
    private Long id;
    /**
     * 会议室名称
     */
    private String name;
    /**
     * 省份
     */
    private String province;
    /**
     * 城市
     */
    private String city;
    /**
     * 会议室楼层
     */
    private String floor;
    /**
     * 会议室类型
     */
    private String type;
    /**
     * 会议室容纳人数
     */
    private Integer capcity;
    /**
     * 会议室设备
     */
    private String device;
    /**
     * ap mac
     */
    private String apMac;
    /**
     * 门牌eslId
     */
    private String doorEslId;
    /**
     * 铭牌别名列表
     */
    private List<NamePlateAliasParam> namePlateAliasParams;

//     private List<String> namePlateEslIds;

    /**
     * 可用时段-开始
     */
    private String validBeginHour;

    /**
     * 可用时段-结束
     */
    private String validEndHour;

    /**
     * 实拍照片url
     */
    private String picUrl;
    /**
     * 会议室状态 unusable表示维修 usable表示可用
     */
    private String state;
    /**
     * 订阅企业的id
     */
    private String corpId;

    public static RoomEntity convertFor(RoomSaveParam param) {
        RoomEntity roomEntity = new RoomEntity();
        BeanUtils.copyProperties(param, roomEntity);
        return roomEntity;
    }
}
